<template>
	<view class="content">
		<view class="header">
			<view class="userinfo">
				<u-image src="/static/img/me/avatar.png" width="36" height="36"></u-image>
				<view class="nameinfo">
					<text>超级Vip</text>
					<text>Mf</text>
				</view>
			</view>
			<view class="menu">
				<view class="title"><text>业务总览</text></view>
				<view class="items">
					<view class="item" @click="handleGo('/pages/spare/spareNote')">
						<u-image src="/static/img/home/spare.png" width="48" height="48"></u-image>
						<text>备品清单</text>
					</view>
					<view class="item" @click="handleGo('/pages/spare/addSpareIn')">
						<u-image src="/static/img/home/sparein.png" width="48" height="48"></u-image>
						<text>备品入库</text>
					</view>
					<view class="item" @click="handleGo('/pages/spare/spareOut')">
						<u-image src="/static/img/home/spareout.png" width="48" height="48"></u-image>
						<text>备品出库</text>
					</view>
				</view>
			</view>
		</view>
		<view class="menu smenu">
			<view class="items">
				<view class="item" @click="handleGo('/pages/spare/distNote')">
					<u-image src="/static/img/home/dist.png" width="48" height="48"></u-image>
					<text>原料清单</text>
				</view>
				<view class="item" @click="handleGo('/pages/spare/distIn')">
					<u-image src="/static/img/home/distin.png" width="48" height="48"></u-image>
					<text>原料入库</text>
				</view>
				<view class="item" @click="handleGo('/pages/spare/distOut')">
					<u-image src="/static/img/home/distout.png" width="48" height="48"></u-image>
					<text>原料出库</text>
				</view>
			</view>
		</view>
		<view class="menu smenu row">
			<view class="items">
				<view class="item">
					<u-image src="/static/img/home/purchace.png" width="48" height="48"></u-image>
					<text>采购申请</text>
				</view>
			</view>
		</view>
		<view class="menu smenu">
			<view class="title"><text>业务审核</text></view>
			<view class="items">
				<view class="item">
					<u-image src="/static/img/home/spare.png" width="48" height="48"></u-image>
					<text>业务审核</text>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import {userInfo,spareIn} from '@/config/api';
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {
			this.getUserInfo();
		},
		methods: {
			async  getUserInfo(){
				const res=await userInfo();
				console.log(res);
			},
			handleGo(str){
				uni.navigateTo({
					url:`${str}`
				})
			},
			
		}
	}
</script>

<style lang="less">
	page{
		background-color: rgb(248, 248, 248);
	}
	.content {
		display: flex;
		flex-direction: column;
	}

	text {
		font-size: 24rpx;
	}

	.header {
		display: flex;
		flex-direction: column;
		padding: 32rpx 32rpx 0rpx 32rpx;
		background-color: rgb(39, 115, 239);
	}

	.userinfo {
		display: flex;
		flex-direction: row;
	}

	.nameinfo {
		display: flex;
		flex-direction: column;
		margin-left: 24rpx;
	}

	.nameinfo text {
		font-size: 24rpx;
		color: #ffffff;
		display: flex;
	}

	.menu {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background-color: #ffffff;
		border-top-left-radius: 10rpx;
		border-top-right-radius: 10rpx;
		margin-top: 32rpx;
		.title {
			border-left: rgb(39, 115, 239) 10rpx solid;
			display: flex;
			align-items: center;
			padding-left: 8rpx;
			margin-bottom: 16rpx;
			margin-top: 32rpx;
		}

	}

	.items {
		display: flex;
		box-sizing: border-box;
		justify-content: space-between;
		padding: 32rpx 32rpx 0rpx 32rpx;
	}

	.item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

	}

	.item text {
		margin-top: 12rpx;
	}

	.smenu {
		display: flex;
		box-sizing: border-box;
		margin: 0 32rpx 0rpx 32rpx;
		padding: 32rpx 0 32rpx 0;
		border-radius: 10rpx;
	}
	.row{
		margin: 0 32rpx 32rpx 32rpx;
	}
</style>